<template>
  <div class="chart-card">
    <div class="clearfix">
      <span>其他</span>
    </div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="orgName" label="学校名称" />
      <el-table-column
        prop="content1"
        label="伙食补助(元/人//日)"
        align="right"
      />
      <el-table-column
        prop="content2"
        label="服装补助(元/人/年)"
        align="right"
      />
      <el-table-column
        prop="content3"
        label="文化课时(学时/周)"
        width="120"
        align="center"
      />
    </el-table>
    <!-- 分页 -->
    <el-pagination
      layout="prev, pager, next"
      :total="total"
      :page-size="pageSize"
    >
    </el-pagination>
  </div>
</template>

<script>
import { subsidy } from "@/api/statistics";
export default {
  data() {
    return {
      tableData: [],
      total: 0,
      pageNum: 1,
      pageSize: 10
    };
  },
  methods: {
    getData() {
      subsidy({
        year: new Date().getFullYear(),
        pageNum: this.pageNum,
        pageSize: this.pageSize
      }).then(res => {
        this.tableData = res.data.dataList;
        this.total = res.data.countNum;
      });
    }
  },
  mounted() {
    this.getData();
  }
};
</script>

<style scoped>
.chart-card {
  height: 100%;
  background: #fff;
  border-radius: 4px;
  padding: 20px;
}

.chart-card .el-card__header {
  padding: 15px 20px;
  border-bottom: 1px solid #ebeef5;
}

.el-table th {
  background-color: #f5f7fa !important;
}

.clearfix {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
</style>
